package com.hzncc.flowable_diboot.excel.model;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.diboot.core.util.D;
import com.diboot.file.excel.BaseExcelModel;
import com.diboot.file.excel.annotation.ExcelBindField;
import com.diboot.iam.entity.IamUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;


/**
* 签到 导入model定义
*
* @author MyName
* @version 1.0
* @date 2024-06-13
 * Copyright © MyCorp
*/
@Getter
@Setter
@ExcelIgnoreUnannotated
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 1)
public class SalesSignInImportModel extends BaseExcelModel {
    /**
    * 签到人
    */
    @ExcelBindField(
    entity = IamUser.class,
    field = "realname",
    setIdField = "uid"
    )
    @ExcelProperty(value = "签到人")
    private String uidLabel;
    private String uid;
    /**
    * 签到地点
    */
    @Length(max=100, message="签到地点长度应小于100")
    @ExcelProperty(value = "签到地点")
    private String place;
    /**
    * 签到时间
    */
    @DateTimeFormat(D.FORMAT_DATETIME_Y4MDHMS)
    @JsonFormat(pattern = D.FORMAT_DATETIME_Y4MDHMS)
    @ExcelProperty(value = "签到时间")
    private LocalDateTime signInTime;
    /**
    * 详细地点
    */
    @Length(max=200, message="详细地点长度应小于200")
    @ExcelProperty(value = "详细地点")
    private String detailPlace;
    /**
    * 备注
    */
    @Length(max=100, message="备注长度应小于100")
    @ExcelProperty(value = "备注")
    private String remark;
    /**
    * 图片
    */
    @ExcelProperty(value = "图片")
    private String imgList;
    /**
    * 拜访客户
    */
    @Length(max=100, message="拜访客户长度应小于100")
    @ExcelProperty(value = "拜访客户")
    private String visitUser;

}